/*******************************************************************************
 *
 *      Filename: test_Log.cpp
 *   Description: Simple test for Log class
 *        Author: [kb]ypp
 *    Created at: September 28, 2005
 * Last modified: November 26, 2005
 *
 ******************************************************************************/

#include "../Log.h"
#include <iostream>
using namespace std;

int main()
{
	/* Obsolete
	LOG( Log::EMERGENCY, "System is unusable" );
	LOG( Log::ALERT, "Action must be taken immediately" );
	LOG( Log::CRITICAL, "Critical conditions" );
	LOG( Log::ERROR, "Error conditions" );
	LOG( Log::WARNING, "Warning conditions" );
	LOG( Log::NOTICE, "Normal but significant condition" );
	LOG( Log::INFO, "Informational" );
	LOG( Log::DEBUG, "Debug-level messages" );
	
	*Log::instance() <<
		"--------------------------------------------------------------------------------";
	*/
	
	// More convenient:
	LOG_EMERGENCY( "(Emergency) System is unusable" );
	LOG_ALERT( "(Alert) Action must be taken immediately" );
	LOG_CRITICAL( "(Critical) Critical conditions" );
	LOG_ERROR( "(Error) Error conditions" );
	LOG_WARNING( "(Warning) Warning conditions" );
	LOG_NOTICE( "(Notice) Normal but significant condition" );
	LOG_INFO( "(Info) Informational" );
	LOG_DEBUG( "(Debug) Debug-level messages" );

	Log::instance() <<
		"--------------------------------------------------------------------------------";
	
	/*
	Log::instance()->outputTo( "log.txt" );
	LOG_INFO( "message in log.txt" );
	Log::instance()->outputTo( "log2.txt" );
	LOG_INFO( "message in log2.txt" );
	Log::instance()->outputTo( cout );
	LOG_INFO( "message in stdout" );
	Log::instance()->outputTo( cerr );
	LOG_INFO( "again to stderr" );
	Log::instance()->outputTo( cerr );
	LOG_INFO( "once again to stderr" );
	*/
	
	return 0;
}
